package com.wyix.device;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * @author wangdx
 * @since 2025/8/19
 */
@Service
public class SmartThermostat implements Thermostat {
    private final double defaultTemp;
    private final boolean autoAdjust;

    public SmartThermostat(@Value("${smart.home.thermostat.default-temp}")double defaultTemp, @Value("${smart.home.security-enabled}")boolean autoAdjust) {
        this.defaultTemp = defaultTemp;
        this.autoAdjust = autoAdjust;
    }

    @Override
    public String setTemperature(double celsius) {
        return "Setting temperature to " + celsius + " degrees";
    }

    @Override
    public String getCurrentTemperature() {
        return "Current temperature is " + defaultTemp + " degrees";
    }
}
